<?php
error_reporting(E_ALL);
ini_set('display_errors', '1');
ini_set('display_errors', 'on');
defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('YII_ENV') or define('YII_ENV', 'dev');

require __DIR__ . '/../../vendor/autoload.php';
require __DIR__ . '/../../vendor/yiisoft/yii2/Yii.php';
require __DIR__ . '/../../common/config/bootstrap.php';
require __DIR__ . '/../config/bootstrap.php';
$configFiles = [
    '/../../common/config/main.php',
    '/../../common/config/main-local.php',
    '/../config/main.php',
    '/../config/main-local.php'
];
$conf = [];
foreach ($configFiles as $file) {
    if (file_exists(__DIR__ . $file)) {
        $tmp = require __DIR__ . $file;
        $conf = yii\helpers\ArrayHelper::merge($conf, $tmp);
    }
}
$application = new yii\web\Application($conf);
$application->defaultRoute = 'index';
$application->language = 'zh-CN';
$application->run();
